package com.school.demo.model.auto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * @program: demo
 * @description: 去掉密码，salt等信息的user类，用于返回给客户端展示
 * @author: Charlotte
 * @create: 2021-03-02 17:42
 **/
@Data
public class ReturnUser {

    /**
     * 用户ID
     */
    private Long id;

    /**
     * 用户状态:0=正常,1=禁用
     */
    private Boolean state;

    /**
     * 姓名
     */
    private String name;

    /**
     * 头像图片地址
     */
    private String headImgUrl;

    /**
     * 手机号码
     */
    private String pohone;

    public ReturnUser(User user){
        this.headImgUrl = user.getHeadImgUrl();
        this.id = user.getId();
        this.name = user.getName();
        this.pohone = user.getMobile();
        this.state = user.getState();
    };
}
